package com.atguigu.daijia.order.service;

import com.atguigu.daijia.model.entity.order.OrderInfo;
import com.atguigu.daijia.model.form.order.OrderInfoForm;
import com.atguigu.daijia.model.form.order.UpdateOrderCartForm;
import com.atguigu.daijia.model.vo.base.PageVo;
import com.atguigu.daijia.model.vo.order.CurrentOrderInfoVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

public interface OrderInfoService extends IService<OrderInfo> {
    // 获取当前乘客订单
    CurrentOrderInfoVo searchCustomerCurrentOrder(Long customerId);
    // 根据订单id获取订单状态
    Integer getOrderStatus(Long orderId);
    // 司机端查找当前订单
    CurrentOrderInfoVo searchDriverCurrentOrder(Long driverId);
    // 获取司机订单分页列表
    PageVo findDriverOrderPage(Page<OrderInfo> pageParam, Long driverId);
    // 获取乘客订单分页列表
    PageVo findCustomerOrderPage(Page<OrderInfo> pageParam, Long customerId);
    // 保存订单信息
    Long saveOrderInfo(OrderInfoForm orderInfoForm);
    // 司机抢单
    Boolean robNewOrder(Long driverId, Long orderId);
    // 司机到达起始点
    Boolean driverArriveStartLocation(Long orderId, Long driverId);
    // 更新代驾车辆信息
    Boolean updateOrderCart(UpdateOrderCartForm updateOrderCartForm);
}
